package edu.maplef.bookwild.interceptor;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

/**
 * 错误提示信息清除拦截器
 * @author maple
 *
 */
public class ClearFieldErrorInterceptor extends AbstractInterceptor {

	private static final long serialVersionUID = 1L;

	@Override
	public String intercept(ActionInvocation arg0) throws Exception {
		ActionSupport actionsupport = (ActionSupport) arg0.getAction();
		actionsupport.clearErrorsAndMessages();
		String result = arg0.invoke();
		return result;
	}
}
